package api

import (
	"CodeCover/internal/db"
	"CodeCover/internal/handler"
	"CodeCover/internal/respository"
	"CodeCover/internal/service"

	"github.com/gin-gonic/gin"
)

func TokenRoute(r *gin.Engine) {
	sqlUserRepo := respository.NewMysqlUserRepository(db.SqlDB)

	tokenSvc := service.NewUserService(sqlUserRepo)
	tokenHandler := handler.NewUserHandler(tokenSvc)

	r.POST("/apply-api-token", tokenHandler.ApplyToken)

}
